# Some NT Win32 nmake macros.
# For now this resides in samples\inc.

!include <ntwin32.mak>

cvars=-DNT -DWIN

# This line allows NMAKE to work as well

all: demo.exe select.dll

# Update the object files if necessary

demo.obj: demo.c
    $(cc) $(cflags) $(cvars) demo.c
    cvtomf demo.obj

select.obj: select.c
    $(cc) $(cflags) $(cvars) select.c
    cvtomf select.obj

# Update the resources if necessary

demo.res: demo.rc demo.h
    rc -r -fo demo.tmp demo.rc
    cvtres -i386 demo.tmp -o demo.res
    del demo.tmp

# Update the import library

select.lib: select.obj select.def
    coff -lib -machine:i386 \
    -def:select.def	    \
    -out:select.lib


# Update the dynamic link library

select.dll: select.obj select.def
    $(link) $(lflags) \
    -base:0x1C000000  \
    -entry:LibMain    \
    -out:select.dll   \
    select.exp select.obj $(guilibs)


# Update the executable file if necessary.
# If so, add the resource back in.

demo.exe: demo.obj select.lib demo.res demo.def
    $(link) $(guiflags) -out:demo.exe demo.obj select.lib demo.res $(guilibs)
